﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Microsoft.Practices.Unity;
using Vit.Web;
using Vit.Web.Models;

namespace Vit.Mvc.Models
{
    public partial class PageModule : IPageModule
    {
        #region IPageModule Members

        public IPage Page
        {
            get { return this.Page; }
        }

        public IWebModule Module
        {
            get 
            {
                var module = WebUnity.Current.UnityContainer.Resolve<IWebModule>(this.ModuleID.ToString());
                if (module != null)
                    module.Parameters = this.Parameter;
                return module;
            }
        }

        #endregion
    }
}
